trapezoidal approximation